<?php

$data = $_POST;

$k = $_GET['k'];

$oldArr = file_get_contents("./data/db.txt");

$oldArr = json_decode($oldArr,true);

$oldArr[$k] = $data;

$str = json_encode($oldArr);

file_put_contents("./data/db.txt",$str);

header("Location:./index.php");

